import { Container, Content, Form, Header, Icon, Picker, Text, View } from 'native-base';
import React, { BaseSyntheticEvent } from 'react';

export default function tpl(a: <T>(action: string, ...args: unknown[]) => ((ev: BaseSyntheticEvent<T>) => void), s: (...class_names: string[]) => {}, d: (d: string) => string | unknown[]) {
	// const arr = ['Wallet', 'ATM Card', 'Debit Card', 'Credit Card', 'Net Banking'];
	const arr = d('select-options') as string[];
	if (arr) {
		return (<Container>
			<Header />
			<Content>
				<Form>
					<Picker
						mode='dropdown'
						placeholder="Select One"
						placeholderStyle={{ color: "#2874F0" }}
						style={{ width: 120 }}
						note={false}
						selectedValue={d('selected')}
						onValueChange={a('a002')}>
						{arr.map((item) => {
							return (
								<Picker.Item label={item} value={item} />
							);
						})}
					</Picker>

					<Picker
						mode="dropdown"
						iosHeader="Select your SIM"
						iosIcon={<Icon name="arrow-down" />}
						style={{ width: undefined }}
						selectedValue={d('selected')}
						onValueChange={a('a002')}>
						{arr.map((item) => {
							return (
								<Picker.Item label={item} value={item} />
							);
						})}
					</Picker>

				</Form>
			</Content>
		</Container>);
	} else {
		return (
			<View>
				<Text>正在加载中。。。</Text>
			</View>
		);
	}
}
